<form class="form-horizontal" name="form1" ng-submit="onSubmit(form1)">

  <div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">
      <span aria-hidden="true">&times;</span>
    </button>
    <h4 class="modal-title">
      <i class="fa fa-user text-orange"></i>
        {{'update'|translate}}
    </h4>
  </div>
  <div class="modal-body">

    <div class="alert alert-warning">
      {{'user.update.message.tip'|translate}}
      <!-- 请自行确保当前操作登录用户需要有 AliyunRAMFullAccess 权限。 -->
    </div>

    <div class="form-group" ng-class="{'has-error':!form1.username.$valid}">
       <label class="col-sm-3 control-label"><span class="red">*</span> {{'username'|translate}}:</label>
       <div class="col-sm-7">
          <input required ng-pattern="/^[a-zA-Z0-9\.@\-_]+$/" name="username" type="text" class="form-control" ng-model="item.NewUserName"/>
       </div>
    </div>

    <div class="form-group">
       <label class="col-sm-3 control-label">{{'displayName'|translate}}:</label>
       <div class="col-sm-7">
          <input type="text" class="form-control" ng-model="item.NewDisplayName"/>
       </div>
    </div>

    <div class="form-group">
       <label class="col-sm-3 control-label">{{'mobilePhone'|translate}}:</label>
       <div class="col-sm-7">
         <div class="input-group">
           <span class="input-group-btn">
             <button type="button" class="btn btn-default dropdown-toggle"
             data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
             >{{countryNumMap[item._MobilePhonePre].label}} <span class="caret"></span></button>
             <ul class="dropdown-menu">
               <li ng-repeat="n in countryNum"><a href="" ng-click="item._MobilePhonePre=n.value">{{n.label}}</a></li>
             </ul>
            </span>
            <input type="text" class="form-control" ng-model="item._MobilePhoneNum"/>
          </div>
       </div>
    </div>

    <div class="form-group" ng-class="{'has-error':!form1.email.$valid}">
       <label class="col-sm-3 control-label">{{'email'|translate}}:</label>
       <div class="col-sm-7">
          <input type="text" ng-required="false" name="email" ng-pattern="reg.email" class="form-control" ng-model="item.NewEmail"/>
       </div>
    </div>

    <div class="form-group">
       <label class="col-sm-3 control-label">{{'comments'|translate}}:</label>
       <div class="col-sm-7">
          <textarea max="128" rows="3" class="form-control" ng-model="item.NewComments"></textarea>
       </div>
    </div>


  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-primary btn-sm">
      <i class="fa fa-check"></i>
      <!-- 确定 -->
      {{'ok'|translate}}
    </button>
    <button type="button" class="btn btn-default btn-sm" ng-click="cancel()">
      <i class="glyphicon glyphicon-remove"></i>
      <!-- 关闭 -->
      {{'close'|translate}}
    </button>
  </div>
</div>
</form>
